<template>
  <view class="page flex flex-direction">
    <!-- 头部 start -->
    <headTop  @getHeight="getHeight"  @searchHomeChange="searchHomeChange"></headTop>
    <!-- 头部 end -->
    <!-- 分类 start-->
    <cate :topHeight="topHeight"  @cateHomeChange="searchHomeChange"></cate>
    <!-- 分类 end -->

  </view>
</template>

<script>
  // 引入标题+店铺详情
  import headTop from '../../components/head/head.vue';
  // 引入分类
  import cate from '../../components/fu-cate/fu-cate.vue';
export default {
  components:{
    headTop,cate
  },
  data() {
    return {
       topHeight:0
    };
  },
  created() {

  },
  mounted() {
  },
  methods: {
    /**
     * @description 子传父
     * @param {String} data 跳转组件
     */
    searchHomeChange(data){
      this.$emit('barChange',data);
    },
    /**
     * @description 获取头部+店铺高度
     */
    getHeight(data){
      this.topHeight = data;
    }
  },
};
</script>

<style scoped lang="scss">

</style>
